+2001-03-07 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_get_property): remove trailer
+ (gtk_entry_set_property): remove trailer
+
+ * gtk/gtkentry.c (gtk_entry_set_width_chars):
+ (gtk_entry_get_width_chars): new functions, to set size request to
+ a given number of characters
+
+ * gtk/testgtk.c (create_dialog): beef up the dialog test slightly
+
+ * gtk/gtkdialog.c (gtk_dialog_set_has_separator): new function
+ (gtk_dialog_get_has_separator): new function
+ (run_delete_handler): fix to not emit "response" signal
+ because we already did in the delete event handler installed
+ at dialog creation time.
+
+ * gtk/gtkdialog.h: add a has_separator property,
+ add GTK_DIALOG_NO_SEPARATOR flag
+
2001-03-07 Havoc Pennington <hp@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
+2001-03-07 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_get_property): remove trailer
+ (gtk_entry_set_property): remove trailer
+
+ * gtk/gtkentry.c (gtk_entry_set_width_chars):
+ (gtk_entry_get_width_chars): new functions, to set size request to
+ a given number of characters
+
+ * gtk/testgtk.c (create_dialog): beef up the dialog test slightly
+
+ * gtk/gtkdialog.c (gtk_dialog_set_has_separator): new function
+ (gtk_dialog_get_has_separator): new function
+ (run_delete_handler): fix to not emit "response" signal
+ because we already did in the delete event handler installed
+ at dialog creation time.
+
+ * gtk/gtkdialog.h: add a has_separator property,
+ add GTK_DIALOG_NO_SEPARATOR flag
+
2001-03-07 Havoc Pennington <hp@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
+2001-03-07 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_get_property): remove trailer
+ (gtk_entry_set_property): remove trailer
+
+ * gtk/gtkentry.c (gtk_entry_set_width_chars):
+ (gtk_entry_get_width_chars): new functions, to set size request to
+ a given number of characters
+
+ * gtk/testgtk.c (create_dialog): beef up the dialog test slightly
+
+ * gtk/gtkdialog.c (gtk_dialog_set_has_separator): new function
+ (gtk_dialog_get_has_separator): new function
+ (run_delete_handler): fix to not emit "response" signal
+ because we already did in the delete event handler installed
+ at dialog creation time.
+
+ * gtk/gtkdialog.h: add a has_separator property,
+ add GTK_DIALOG_NO_SEPARATOR flag
+
2001-03-07 Havoc Pennington <hp@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
+2001-03-07 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_get_property): remove trailer
+ (gtk_entry_set_property): remove trailer
+
+ * gtk/gtkentry.c (gtk_entry_set_width_chars):
+ (gtk_entry_get_width_chars): new functions, to set size request to
+ a given number of characters
+
+ * gtk/testgtk.c (create_dialog): beef up the dialog test slightly
+
+ * gtk/gtkdialog.c (gtk_dialog_set_has_separator): new function
+ (gtk_dialog_get_has_separator): new function
+ (run_delete_handler): fix to not emit "response" signal
+ because we already did in the delete event handler installed
+ at dialog creation time.
+
+ * gtk/gtkdialog.h: add a has_separator property,
+ add GTK_DIALOG_NO_SEPARATOR flag
+
2001-03-07 Havoc Pennington <hp@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
+2001-03-07 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_get_property): remove trailer
+ (gtk_entry_set_property): remove trailer
+
+ * gtk/gtkentry.c (gtk_entry_set_width_chars):
+ (gtk_entry_get_width_chars): new functions, to set size request to
+ a given number of characters
+
+ * gtk/testgtk.c (create_dialog): beef up the dialog test slightly
+
+ * gtk/gtkdialog.c (gtk_dialog_set_has_separator): new function
+ (gtk_dialog_get_has_separator): new function
+ (run_delete_handler): fix to not emit "response" signal
+ because we already did in the delete event handler installed
+ at dialog creation time.
+
+ * gtk/gtkdialog.h: add a has_separator property,
+ add GTK_DIALOG_NO_SEPARATOR flag
+
2001-03-07 Havoc Pennington <hp@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
+2001-03-07 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_get_property): remove trailer
+ (gtk_entry_set_property): remove trailer
+
+ * gtk/gtkentry.c (gtk_entry_set_width_chars):
+ (gtk_entry_get_width_chars): new functions, to set size request to
+ a given number of characters
+
+ * gtk/testgtk.c (create_dialog): beef up the dialog test slightly
+
+ * gtk/gtkdialog.c (gtk_dialog_set_has_separator): new function
+ (gtk_dialog_get_has_separator): new function
+ (run_delete_handler): fix to not emit "response" signal
+ because we already did in the delete event handler installed
+ at dialog creation time.
+
+ * gtk/gtkdialog.h: add a has_separator property,
+ add GTK_DIALOG_NO_SEPARATOR flag
+
2001-03-07 Havoc Pennington <hp@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
+2001-03-07 Havoc Pennington <hp@redhat.com>
+
+ * gtk/gtkentry.c (gtk_entry_get_property): remove trailer
+ (gtk_entry_set_property): remove trailer
+
+ * gtk/gtkentry.c (gtk_entry_set_width_chars):
+ (gtk_entry_get_width_chars): new functions, to set size request to
+ a given number of characters
+
+ * gtk/testgtk.c (create_dialog): beef up the dialog test slightly
+
+ * gtk/gtkdialog.c (gtk_dialog_set_has_separator): new function
+ (gtk_dialog_get_has_separator): new function
+ (run_delete_handler): fix to not emit "response" signal
+ because we already did in the delete event handler installed
+ at dialog creation time.
+
+ * gtk/gtkdialog.h: add a has_separator property,
+ add GTK_DIALOG_NO_SEPARATOR flag
+
2001-03-07 Havoc Pennington <hp@redhat.com>
* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
@GTK_DIALOG_MODAL:
@GTK_DIALOG_DESTROY_WITH_PARENT:
+@GTK_DIALOG_NO_SEPARATOR:
<!-- ##### ENUM GtkResponseType ##### -->
<para>
@dialog: the object which received the signal.
@arg1: the response ID
+<!-- ##### ARG GtkDialog:has-separator ##### -->
+<para>
+
+</para>
+
</para>
+<!-- ##### ARG GtkEntry:width-chars ##### -->
+<para>
+
+</para>
+
#include "gtksignal.h"
#include "gdkkeysyms.h"
#include "gtkmain.h"
+#include "gtkintl.h"
static void gtk_dialog_class_init (GtkDialogClass *klass);
static void gtk_dialog_init (GtkDialog *dialog);
GdkEventAny *event,
gpointer user_data);
+static void gtk_dialog_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gtk_dialog_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+enum {
+ PROP_0,
+ PROP_HAS_SEPARATOR
+};
enum {
RESPONSE,
static void
gtk_dialog_class_init (GtkDialogClass *class)
{
+ GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
-
- object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
+
+ gobject_class = G_OBJECT_CLASS (class);
+ object_class = GTK_OBJECT_CLASS (class);
+ widget_class = GTK_WIDGET_CLASS (class);
parent_class = g_type_class_peek_parent (class);
+
+ gobject_class->set_property = gtk_dialog_set_property;
+ gobject_class->get_property = gtk_dialog_get_property;
widget_class->key_press_event = gtk_dialog_key_press;
+ g_object_class_install_property (gobject_class,
+ PROP_HAS_SEPARATOR,
+ g_param_spec_boolean ("has_separator",
+ _("Has separator"),
+ _("The dialog has a separator bar above its buttons"),
+ TRUE,
+ G_PARAM_READWRITE));
+
dialog_signals[RESPONSE] =
gtk_signal_new ("response",
GTK_RUN_LAST,
static void
gtk_dialog_init (GtkDialog *dialog)
{
- GtkWidget *separator;
-
/* To avoid breaking old code that prevents destroy on delete event
* by connecting a handler, we have to have the FIRST signal
* connection on the dialog.
FALSE, TRUE, 0);
gtk_widget_show (dialog->action_area);
- separator = gtk_hseparator_new ();
- gtk_box_pack_end (GTK_BOX (dialog->vbox), separator, FALSE, TRUE, 0);
- gtk_widget_show (separator);
+ dialog->separator = gtk_hseparator_new ();
+ gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->separator, FALSE, TRUE, 0);
+ gtk_widget_show (dialog->separator);
gtk_window_set_type_hint (GTK_WINDOW (dialog),
GDK_WINDOW_TYPE_HINT_DIALOG);
}
+
+static void
+gtk_dialog_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ GtkDialog *dialog;
+
+ dialog = GTK_DIALOG (object);
+
+ switch (prop_id)
+ {
+ case PROP_HAS_SEPARATOR:
+ gtk_dialog_set_has_separator (dialog, g_value_get_boolean (value));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gtk_dialog_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GtkDialog *dialog;
+
+ dialog = GTK_DIALOG (object);
+
+ switch (prop_id)
+ {
+ case PROP_HAS_SEPARATOR:
+ g_value_set_boolean (value, dialog->separator != NULL);
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
static gint
gtk_dialog_delete_event_handler (GtkWidget *widget,
GdkEventAny *event,
if (key->keyval != GDK_Escape)
return FALSE;
- /* Synthesize delete_event on key press. */
+ /* Synthesize delete_event to close dialog. */
g_object_ref (G_OBJECT (event.window));
gtk_main_do_event ((GdkEvent*)&event);
if (flags & GTK_DIALOG_DESTROY_WITH_PARENT)
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
+ if (flags & GTK_DIALOG_NO_SEPARATOR)
+ gtk_dialog_set_has_separator (dialog, FALSE);
+
return GTK_WIDGET (dialog);
}
* enumeration. If the user clicks one of these dialog buttons,
* #GtkDialog will emit the "response" signal with the corresponding
* response ID. If a #GtkDialog receives the "delete_event" signal, it
- * will emit "response" with a response ID of GTK_RESPONSE_NONE.
+ * will emit "response" with a response ID of GTK_RESPONSE_DELETE_EVENT.
* However, destroying a dialog does not emit the "response" signal;
* so be careful relying on "response" when using
* the GTK_DIALOG_DESTROY_WITH_PARENT flag. Buttons are from left to right,
g_list_free (children);
}
+void
+gtk_dialog_set_has_separator (GtkDialog *dialog,
+ gboolean setting)
+{
+ g_return_if_fail (GTK_IS_DIALOG (dialog));
+
+ /* this might fail if we get called before _init() somehow */
+ g_assert (dialog->vbox != NULL);
+
+ if (setting && dialog->separator == NULL)
+ {
+ dialog->separator = gtk_hseparator_new ();
+ gtk_box_pack_end (GTK_BOX (dialog->vbox), dialog->separator, FALSE, TRUE, 0);
+
+ /* The app programmer could screw this up, but, their own fault.
+ * Moves the separator just above the action area.
+ */
+ gtk_box_reorder_child (GTK_BOX (dialog->vbox), dialog->separator, 1);
+ gtk_widget_show (dialog->separator);
+ }
+ else if (!setting && dialog->separator != NULL)
+ {
+ gtk_widget_destroy (dialog->separator);
+ dialog->separator = NULL;
+ }
+
+ g_object_notify (G_OBJECT (dialog), "has_separator");
+}
+
+gboolean
+gtk_dialog_get_has_separator (GtkDialog *dialog)
+{
+ g_return_val_if_fail (GTK_IS_DIALOG (dialog), FALSE);
+
+ return dialog->separator != NULL;
+}
+
/**
* gtk_dialog_response:
* @dialog: a #GtkDialog
RunInfo *ri = data;
shutdown_loop (ri);
-
- /* emit response signal */
- gtk_dialog_response (dialog, GTK_RESPONSE_NONE);
return TRUE; /* Do not destroy */
}
/* Parameters for dialog construction */
typedef enum
{
- GTK_DIALOG_MODAL, /* call gtk_window_set_modal (win, TRUE) */
- GTK_DIALOG_DESTROY_WITH_PARENT /* call gtk_window_set_destroy_with_parent () */
-
+ GTK_DIALOG_MODAL, /* call gtk_window_set_modal (win, TRUE) */
+ GTK_DIALOG_DESTROY_WITH_PARENT, /* call gtk_window_set_destroy_with_parent () */
+ GTK_DIALOG_NO_SEPARATOR /* no separator bar above buttons */
} GtkDialogFlags;
/* Convenience enum to use for response_id's. Positive values are
GtkWidget *vbox;
GtkWidget *action_area;
+
+ /*< private >*/
+ GtkWidget *separator;
};
struct _GtkDialogClass
void gtk_dialog_set_default_response (GtkDialog *dialog,
gint response_id);
+void gtk_dialog_set_has_separator (GtkDialog *dialog,
+ gboolean setting);
+gboolean gtk_dialog_get_has_separator (GtkDialog *dialog);
+
/* Emit response signal */
void gtk_dialog_response (GtkDialog *dialog,
gint response_id);
PROP_MAX_LENGTH,
PROP_VISIBILITY,
PROP_INVISIBLE_CHAR,
- PROP_ACTIVATES_DEFAULT
+ PROP_ACTIVATES_DEFAULT,
+ PROP_WIDTH_CHARS
};
static guint signals[LAST_SIGNAL] = { 0 };
static void gtk_entry_set_property (GObject *object,
guint prop_id,
const GValue *value,
- GParamSpec *pspec,
- const gchar *trailer);
+ GParamSpec *pspec);
static void gtk_entry_get_property (GObject *object,
guint prop_id,
GValue *value,
- GParamSpec *pspec,
- const gchar *trailer);
+ GParamSpec *pspec);
static void gtk_entry_finalize (GObject *object);
/* GtkWidget methods
_("Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed."),
FALSE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
+ g_object_class_install_property (gobject_class,
+ PROP_WIDTH_CHARS,
+ g_param_spec_int ("width_chars",
+ _("Width in chars"),
+ _("Number of characters to leave space for in the entry."),
+ -1,
+ G_MAXINT,
+
+ -1,
+ G_PARAM_READABLE | G_PARAM_WRITABLE));
signals[INSERT_TEXT] =
gtk_signal_new ("insert_text",
iface->get_position = gtk_entry_get_position;
}
-static void gtk_entry_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec,
- const gchar *trailer)
+static void
+gtk_entry_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GtkEntry *entry = GTK_ENTRY (object);
case PROP_ACTIVATES_DEFAULT:
gtk_entry_set_activates_default (entry, g_value_get_boolean (value));
break;
+
+ case PROP_WIDTH_CHARS:
+ gtk_entry_set_width_chars (entry, g_value_get_int (value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
}
-static void gtk_entry_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec,
- const gchar *trailer)
+static void
+gtk_entry_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GtkEntry *entry;
case PROP_ACTIVATES_DEFAULT:
g_value_set_boolean (value, entry->activates_default);
break;
+ case PROP_WIDTH_CHARS:
+ g_value_set_int (value, entry->width_chars);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
entry->visible = TRUE;
entry->invisible_char = '*';
entry->dnd_position = -1;
-
+ entry->width_chars = -1;
+
entry->has_frame = TRUE;
gtk_drag_dest_set (GTK_WIDGET (entry),
xborder += 1;
yborder += 1;
}
-
- requisition->width = MIN_ENTRY_WIDTH + xborder * 2;
+
+ if (entry->width_chars < 0)
+ requisition->width = MIN_ENTRY_WIDTH + xborder * 2;
+ else
+ {
+ requisition->width =
+ PANGO_PIXELS (metrics.approximate_char_width) * entry->width_chars +
+ xborder * 2;
+ }
+
requisition->height = ((metrics.ascent + metrics.descent) / PANGO_SCALE +
yborder * 2);
}
return entry->activates_default;
}
+/**
+ * gtk_entry_set_width_chars:
+ * @entry: a #GtkEntry
+ * @n_chars: width in chars
+ *
+ * Changes the size request of the entry to be about the right size
+ * for @n_chars characters. Note that it changes the size
+ * <emphasize>request</emphasize>, the size can still be affected by
+ * how you pack the widget into containers. If @n_chars is -1, the
+ * size reverts to the default entry size.
+ *
+ **/
+void
+gtk_entry_set_width_chars (GtkEntry *entry,
+ gint n_chars)
+{
+ g_return_if_fail (GTK_IS_ENTRY (entry));
+
+ if (entry->width_chars != n_chars)
+ {
+ entry->width_chars = n_chars;
+ g_object_notify (G_OBJECT (entry), "width_chars");
+ gtk_widget_queue_resize (GTK_WIDGET (entry));
+ }
+}
+
+/**
+ * gtk_entry_get_width_chars:
+ * @entry: a #GtkEntry
+ *
+ * Gets the value set by gtk_entry_set_width_chars().
+ *
+ * Return value: number of chars to request space for, or negative if unset
+ **/
+gint
+gtk_entry_get_width_chars (GtkEntry *entry)
+{
+ return entry->width_chars;
+}
+
/**
* gtk_entry_set_has_frame:
* @entry: a #GtkEntry
gint drag_start_y;
gunichar invisible_char;
+
+ gint width_chars;
};
struct _GtkEntryClass
gboolean setting);
gboolean gtk_entry_get_activates_default (GtkEntry *entry);
+void gtk_entry_set_width_chars (GtkEntry *entry,
+ gint n_chars);
+gint gtk_entry_get_width_chars (GtkEntry *entry);
+
/* Somewhat more convenient than the GtkEditable generic functions
*/
void gtk_entry_set_text (GtkEntry *entry,
gtk_spin_button_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
+ GtkEntry *entry;
+
g_return_if_fail (widget != NULL);
g_return_if_fail (requisition != NULL);
g_return_if_fail (GTK_IS_SPIN_BUTTON (widget));
- GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
+ entry = GTK_ENTRY (widget);
- requisition->width = MIN_SPIN_BUTTON_WIDTH + ARROW_SIZE
- + 2 * widget->style->xthickness;
+ GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
+
+ if (entry->width_chars < 0)
+ requisition->width = MIN_SPIN_BUTTON_WIDTH + ARROW_SIZE +
+ 2 * widget->style->xthickness;
+ else
+ requisition->width += ARROW_SIZE + 2 * widget->style->xthickness;
}
static void
gtk_widget_destroy (*label);
}
+#define RESPONSE_TOGGLE_SEPARATOR 1
+
+static void
+print_response (GtkWidget *dialog,
+ gint response_id,
+ gpointer data)
+{
+ g_print ("response signal received (%d)\n", response_id);
+
+ if (response_id == RESPONSE_TOGGLE_SEPARATOR)
+ {
+ gtk_dialog_set_has_separator (GTK_DIALOG (dialog),
+ !gtk_dialog_get_has_separator (GTK_DIALOG (dialog)));
+ }
+}
+
static void
create_dialog (void)
{
if (!dialog_window)
{
+ /* This is a terrible example; it's much simpler to create
+ * dialogs than this. Don't use testgtk for example code,
+ * use gtk-demo ;-)
+ */
+
dialog_window = gtk_dialog_new ();
+ gtk_signal_connect (GTK_OBJECT (dialog_window),
+ "response",
+ GTK_SIGNAL_FUNC (print_response),
+ NULL);
+
gtk_signal_connect (GTK_OBJECT (dialog_window), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
&dialog_window);
gtk_window_set_title (GTK_WINDOW (dialog_window), "GtkDialog");
gtk_container_set_border_width (GTK_CONTAINER (dialog_window), 0);
- gtk_widget_set_usize (dialog_window, 200, 110);
button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_show (button);
label = NULL;
+
+ button = gtk_button_new_with_label ("Separator");
+
+ GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+
+ gtk_dialog_add_action_widget (GTK_DIALOG (dialog_window),
+ button,
+ RESPONSE_TOGGLE_SEPARATOR);
+ gtk_widget_show (button);
}
if (!GTK_WIDGET_VISIBLE (dialog_window))
gtk_widget_destroy (*label);
}
+#define RESPONSE_TOGGLE_SEPARATOR 1
+
+static void
+print_response (GtkWidget *dialog,
+ gint response_id,
+ gpointer data)
+{
+ g_print ("response signal received (%d)\n", response_id);
+
+ if (response_id == RESPONSE_TOGGLE_SEPARATOR)
+ {
+ gtk_dialog_set_has_separator (GTK_DIALOG (dialog),
+ !gtk_dialog_get_has_separator (GTK_DIALOG (dialog)));
+ }
+}
+
static void
create_dialog (void)
{
if (!dialog_window)
{
+ /* This is a terrible example; it's much simpler to create
+ * dialogs than this. Don't use testgtk for example code,
+ * use gtk-demo ;-)
+ */
+
dialog_window = gtk_dialog_new ();
+ gtk_signal_connect (GTK_OBJECT (dialog_window),
+ "response",
+ GTK_SIGNAL_FUNC (print_response),
+ NULL);
+
gtk_signal_connect (GTK_OBJECT (dialog_window), "destroy",
GTK_SIGNAL_FUNC(gtk_widget_destroyed),
&dialog_window);
gtk_window_set_title (GTK_WINDOW (dialog_window), "GtkDialog");
gtk_container_set_border_width (GTK_CONTAINER (dialog_window), 0);
- gtk_widget_set_usize (dialog_window, 200, 110);
button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_show (button);
label = NULL;
+
+ button = gtk_button_new_with_label ("Separator");
+
+ GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+
+ gtk_dialog_add_action_widget (GTK_DIALOG (dialog_window),
+ button,
+ RESPONSE_TOGGLE_SEPARATOR);
+ gtk_widget_show (button);
}
if (!GTK_WIDGET_VISIBLE (dialog_window))